package cn.lzj.mapper;

import cn.lzj.pojo.ProductBase;
import cn.lzj.pojo.User;
import org.apache.ibatis.annotations.Param;

public interface UserMapper {

    User selectByAccountNo(@Param("accountNo") String accountNo);

    User selectById(@Param("userId") Integer userId);

    User selectByAccountNoAndPassword(@Param("accountNo") String accountNo, @Param("password") String password);

    User selectByPhone(@Param("telephone") String telephone);

    //  把商家的类型改为用户
    int userExitShopping(@Param("userId") Integer userId);

    //更改用户的邮箱
    int modifyUserEmail(@Param("userId") Integer userId,@Param("userEmail") String email);

    //更改用户的电话号码
    int modifyUserTelephone(@Param("userId") Integer userId,@Param("telephone") String newPhone);
    User getUserById(@Param("userid") Integer userid);

    int modifyHeadImg(@Param("userId") Integer userId, @Param("userHeadImg") String userHeadImg);

    void modifyUserPassword(@Param("user") User user);
}

